package com.arges.controller;

import com.arges.pojo.TestPojo;
import lombok.extern.slf4j.Slf4j;

import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;

public class Test3 {

    public static void main(String[] args) {

        for (int i = 0; i < 10; i++) {

            try {
                if (i == 2 || i == 7 || i == 4){
                   throw new IllegalArgumentException("Illegal number of arguments::{"+i+"}");
                }

                System.out.println("i :"+i);
            } catch (IllegalArgumentException e) {
                System.out.println(i);
            }
        }

        List<Integer> list = new ArrayList<Integer>();
        list.add(1);
        list.add(2);
        list.add(3);
        list.add(4);
        list.add(5);
        Collections.addAll(list,7,3,4,5,6,8);
        System.out.println(list);
        list.stream().forEach(System.out::println);
    }
}
